package com.ant.storage.mapper;

import com.ant.storage.pojo.LossReporting;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface LossReportingMapper extends BaseMapper<LossReporting>{

    /**
     * 报损单中间表插入
     * @param loss_reporting_id 报损单id
     * @param commodity_id  商品id
     * @param loss_reporting_quantity  报损数量
     * @param warehouse_id  仓库id
     */
    void addLossReportingCommodity(Integer loss_reporting_id, Integer commodity_id, Integer loss_reporting_quantity, Integer warehouse_id);

    /**
     * 报损单查询
     * @param page
     * @param limit
     * @param map
     * @return
     */
    List<LossReporting> queryAllocation(Integer page, Integer limit,@Param(value = "map") Map map);

    /**
     * 报损单查询统计
     * @param map
     * @return
     */
    Integer countReportingMapper(@Param(value = "map")Map map);
}
